define(['jquery'],()=>{
    const baseUrl = 'http://www.xmyxapp.com/api'
    return {
        getTabs (){
            return new Promise( resolve =>{
                $.get (`${baseUrl}/tabs`,resolve)

            })

        },
        getCategory (id){
            return new Promise ( resolve =>{

                $.get(`${baseUrl}/tab/${id}?start=0&sort=2`, resolve )

            })
        },
        getDetail (id){

            return new Promise ( resolve =>{

                $.get(`${baseUrl}/detail`,{ id },resolve)

            })


        }



        



    }


});